package com.ws.lv.service.impl;

import com.ws.lv.bean.Link;
import com.ws.lv.mapper.LinkMapper;
import com.ws.lv.service.LinkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class LinkServiceImpl implements LinkService {

    @Autowired
    LinkMapper linkMapper;

    @Override
    public List<Link> selectLinks(String link_name, Integer link_state, String link_order) {
        return linkMapper.selectLinks(link_name, link_state, link_order);
    }

    @Override
    public int insertLink(Link link) {
        return linkMapper.insertLink(link);
    }

    @Override
    public int updateLinkDisplay(int link_id) {
        return linkMapper.updateLinkDisplay(link_id);
    }

    @Override
    public int updateLinkHide(int link_id) {
        return linkMapper.updateLinkHide(link_id);
    }

    @Override
    public int deleteLinks(ArrayList<Integer> link_ids) {
        return linkMapper.deleteLinks(link_ids);
    }


    @Override
    public Link selectLinkById(int link_id) {
        return linkMapper.selectLinkById(link_id);
    }

    @Override
    public int updateLink(Link link) {
        return linkMapper.updateLink(link);
    }

    @Override
    public List<Link> homeSelectLinks() {
        return linkMapper.homeSelectLinks();
    }


}
